// 导入usecontext
import {useContext} from "react";
//导入创建的的context
import {Counet} from "./index";

function Newss () {
    let cc = useContext(Counet)
    return (
        <div>
            <h2>这是孙子组件</h2>
            <button onClick={ () => {
                console.log(cc.i)
            } }>这里打印定义的useContext</button>
            <p>渲染{cc.i},{cc.b}</p>
        </div>
    )
}
export default Newss